﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WomanMotion.WebApi.Model.Dtos.Comment
{
    /// <summary>
    /// 添加评论DTO
    /// </summary>
    public class CreatedCommentDTO
    {
        /// <summary>
        /// 文章ID
        /// </summary>
        [Required(ErrorMessage = "文章ID不能为空")]
        public long Contentsid { get; set; }

        /// <summary>
        /// 上级评论ID
        /// </summary>
        public long Parentid { get; set; }

        /// <summary>
        /// 评论内容
        /// </summary>
        [Required(ErrorMessage = "评论内容不能为空")]
        [MaxLength(100, ErrorMessage = "评论内容大于100个字符")]
        [MinLength(3, ErrorMessage = "评论内容小于3个字符")]
        public string? Content { get; set; }
    }
}